Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog to set start and end records for export #2626

Closed

Conversation

ball-hayden
Copy link
Contributor

In response to #2449, I've created a modal dialog for setting start and end records when exporting using download links.

The PR also modifies apply_pagination so that it respects export[:start] and export[:end] parameters.

screenshot from 2013-10-27 22 24 16

Related: #1924

@seanlinsley
Copy link
Contributor

I've added a DSL that wraps jQuery UI modals over in #1815. Maybe this could use that once it's merged.

@ball-hayden
Copy link
Contributor Author

Definitely - that looks great.

Are you happy with the changes to lib/active_admin/resource_controller/data_access.rb to accept start and end parameters?

@abhimediratta
Copy link

Any suggestion to make it export the complete database?
On 28-Oct-2013 4:13 AM, "Hayden Ball" notifications@github.com wrote:

In response to #2449#2449,
I've created a modal dialog for setting start and end records when
exporting using download links.

The PR also modifies apply_pagination so that it respects export[:start]and
export[:end] parameters.

[image: screenshot from 2013-10-27 22 24 16]https://f.cloud.github.com/assets/1596233/1416562/2fb78b4c-3f59-11e3-9e21-f7b3d11bd1c4.png

Related: #1924 #1924

You can merge this Pull Request by running

git pull https://github.com/ball-hayden/active_admin 2449-better-exports

Or view, comment on, or merge it at:

#2626
Commit Summary

  • Added export dialog, with start and end parameters.

File Changes

Patch Links:

@ball-hayden
Copy link
Contributor Author

Set start to 1 and leave end blank.

@abhimediratta
Copy link

I would not like to have a dialog asking for records
On 28-Oct-2013 4:13 AM, "Hayden Ball" notifications@github.com wrote:

In response to #2449#2449,
I've created a modal dialog for setting start and end records when
exporting using download links.

The PR also modifies apply_pagination so that it respects export[:start]and
export[:end] parameters.

[image: screenshot from 2013-10-27 22 24 16]https://f.cloud.github.com/assets/1596233/1416562/2fb78b4c-3f59-11e3-9e21-f7b3d11bd1c4.png

Related: #1924 #1924

You can merge this Pull Request by running

git pull https://github.com/ball-hayden/active_admin 2449-better-exports

Or view, comment on, or merge it at:

#2626
Commit Summary

  • Added export dialog, with start and end parameters.

File Changes

Patch Links:

@seanlinsley
Copy link
Contributor

@abhimediratta if you have a better idea then please discuss it over in #2449, or even open your own PR if you know exactly what you want.

@abhimediratta
Copy link

Please let me know if there is a full export option. I have raised a query
in #2449.
On 30-Oct-2013 7:27 PM, "Sean Linsley" notifications@github.com wrote:

@abhimediratta https://github.com/abhimediratta if you have a better
idea then please discuss it over in #2449#2449,
or even open your own PR if you know exactly what you want.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2626#issuecomment-27390740
.

@seanlinsley
Copy link
Contributor

Yeah I saw that, but "open source" doesn't mean "ask for features from random people on the internet and just expect them to do it". Right now no such feature exists, and we're working to change that. But if you're going to complain about the work done by @ball-hayden then you should suggest an alternative and/or implement it.

@abhimediratta
Copy link

I will start working on it. I apologize, I thought there must have been a
workaround for it.

@ball-hayden
Copy link
Contributor Author

Perhaps an idea would be to have a config option to either:

  • Export current records (as it is at the moment)
  • Export all records
  • Show a dialog

Do you think it would be worth having a clear "all" option in the dialog (radio button all / select records)?

@macfanatic
Copy link
Contributor

@ball-hayden I like the thought of this, but I would like to see an inheritable setting that we could specify for the app, per namespace, or per resource with the options you mentioned above.

I definitely don't want the default behavior to be a modal popup for my projects either :)

@seanlinsley
Copy link
Contributor

While I'm not in love with the thought of a modal popup either, I think in any way promising to the user or developer that Active Admin can handle exporting all records is the wrong way to go. There either needs to be a hard limit like we had before, or some UI to help the user export the data in batches.

@ball-hayden
Copy link
Contributor Author

Slightly messily, I've rebased onto #1815 to use @seanlinsley's dialog DSL.

I'm going to have a look at adding configuration options.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.22%) when pulling 704158d on ball-hayden:2449-better-exports into 37048c7 on gregbell:master.

@ball-hayden
Copy link
Contributor Author

I'm going to close this, as #3038 seems to be a much better solution.

@ball-hayden ball-hayden closed this Jul 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants